package bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.Arrays;
@Component("teacher")
public class Teacher {
    MyClass myClass;
    @Value("李老师")
    private String name;
    String[] course_name;

    public Teacher(MyClass myClass, String name, String[] course_name) {
        this.myClass = myClass;
        this.name = name;
        this.course_name = course_name;
    }

    public MyClass getMyClass() {
        return myClass;
    }

    public void setMyClass(MyClass myClass) {
        this.myClass = myClass;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String[] getCourse_name() {
        return course_name;
    }

    public void setCourse_name(String[] course_name) {
        this.course_name = course_name;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "myClass=" + myClass +
                ", name='" + name + '\'' +
                ", course_name=" + Arrays.toString(course_name) +
                '}';
    }

    public Teacher() {
    }
}
